<template>
  <div class="home">
    <h1>子组件</h1>
    <button @click="change('wuhan')">测试emit组件</button>
  </div>
</template>

<script>
export default {
  methods: {
    change(val) {
      let data = {
        msg: val,
      };
      this.$emit("show", data);
    },
  },
};
</script>

<style></style>
